#pragma once

//
// memory buffer + offset and length
//
// Read loads from disk into m_buffer
// Writes save from m_buffer to disk
//
// begin and size track what m_buffer was on disk
//
// each call to Read updates begin and size
//
class Buffer
{
public:
	Buffer();
	~Buffer();

	bool Read(const std::wstring & filename);

	void Write(const std::wstring & filename);

	ULONGLONG begin();
	ULONGLONG size();

private:
	ULONGLONG m_offset;
	DWORD m_length;

	BYTE * m_buffer;
	DWORD m_bufferlength;
};

